
#pragma once

#include "../stdafx.h"
#include "../Network/Packet.h"
#include "../User/User.h"

class CClientConnection : public CThreadObject 
{
public:
	
	CClientConnection(SOCKET s);
	virtual ~CClientConnection();

	// Thread Support
    virtual void InitThread ();
    virtual void Run ();
    virtual void FlushThread ();

public:

protected:

	/* properties */
	SOCKET			userSocket;
	bool			userAuthenticated;
	BYTE			userClientType;
	CUser*			userObject;
	unsigned int	userId;

	/* functions */

	bool		AuthenticateLoginPacket();
	CPacket*	getWaitingPacket();

};